package plataforma.cih.campos;

import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zul.Textbox;

public class CampoTexto extends Textbox {

	boolean goUpper = false;

	public boolean isGoUpper() {
		return goUpper;
	}

	public void setGoUpper(boolean goUpper) {
		this.goUpper = goUpper;
	}

	public String getValue() throws WrongValueException {

		if (_value != null) {

			if (goUpper)
				return super.getValue().toUpperCase();
			else
				return super.getValue();
		} else
			return null;
	}

	public void definirTamanhoMedio() {

		DecoratorCampo.definirTamanhoMedio(this);

	}

	public void definirTamanhoGrande() {

		DecoratorCampo.definirTamanhoGrande(this);

	}

}
